﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

// 基本ページのアイテム テンプレートについては、http://go.microsoft.com/fwlink/?LinkId=234237 を参照してください

namespace LeapSample
{
    /// <summary>
    /// 多くのアプリケーションに共通の特性を指定する基本ページ。
    /// </summary>
    public sealed partial class MainPage : LeapSample.Common.LayoutAwarePage
    {
        private MainViewModel ViewModel = new MainViewModel();

        public MainPage()
        {
            this.InitializeComponent();
            this.DataContext = this.ViewModel;
        }

        protected override void LoadState(Object navigationParameter, Dictionary<String, Object> pageState)
        {
            this.ViewModel.LeapStart();
        }

        protected override void SaveState(Dictionary<String, Object> pageState)
        {
            this.ViewModel.LeapStop();
        }
    }
}
